package com.yht.redbook.distributed.id.generator.api;

import com.yht.redbook.distributed.id.generator.constant.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author: yht
 * @date: 2025/1/1 19:13
 * @description:
 **/
@FeignClient(name = ApiConstants.SERVICE_NAME)
public interface DistributedIdGeneratorFeignApi {

    String PERFIX = "/id";

    @PostMapping(value = PERFIX + "/segment/get/{key}")
    String getSegmentId(@PathVariable("key") String key);

    @PostMapping(value = PERFIX + "/snowflake/get/{key}")
    String getSnowflakeId(@PathVariable("key") String key);
}
